A KpiDataPage is a resource class which represents a KPI. The parent of a KpiDataPage is the data series that it belongs to. A KPI has 3 main ingredients:

  • A way of aggregating records to get a single number. Eg sum, count, average. This is the aggregation
  • A time interval, such as weekly, monthly, quarterly. As well as the interval there is a multiples, ie 2 weekly, 3 monthly, etc
  • A list of levels which categorise the result. Eg 0-80% is Poor, 80-90% is Good, and 90-100% is Great
When a KPI period is passed then assessments can be generated. Eg if you have a monthly KPI you might generate assessments for January on the 1st of Feb. The assessment is a final result which will not change even if the data series records are subsequently altered. Depending on what KPI result user has achieved they may reach a level, and level may have rewards associated with it. Rewards are allocated as a second step after KPI assessments are generated.


Properties

Name Returns Notes Example
parent CommonCollectionResource
name String
title String
children List
orderingField Integer
period String Returns a textual description
leaderboard KpiLeaderBoard Get the default leaderboard which does not apply any date range restrictions, ie is for all time
assessedResults List Returns all KPI results for the current user
allResults List Returns all KpiResultBean objects for all users for all time
aggregationName String Returns the type of aggregation used in this KPI
lowestKpiLevel KPILevel
highestKpiLevel KPILevel Returns the highest level, ie if this KPI is a search-up KPI then the greatest value
levelNames List Returns a list of all level names defined in this KPI
levelTitles List Returns a list of all level names defined in this KPI
target BigDecimal
latestPeriodStartDate Date Returns the start date of the period following the most recently processed KPI period
latestPeriodEndDate Date Returns the End date of the period following the most recently assessed KPI period
progressLevel KpiLevelBean Find what level the current user is on track to reach based on a pro-rata evaulation of their data vs target over the current kpi assessment period
allRecords List
progress BigDecimal Find the aggregated value of this KPI for the current KPI assessment period
progressPerc BigDecimal
periodElapsedPerc BigDecimal Find the proportion of the current period which has passed as a percentage
myProgressRecords List Get all records for the current period
notes String Returns the notes field from the KPI
periods List

Methods

Name Returns Notes Example
getLeaderboard ( start, end ) KpiLeaderBoard Create a new instance of a leaderboard for the given dates
getAssessedResult ( dt ) KpiResultBean
getAssessedResult ( dt, user ) KpiResultBean
getAssessedResult ( dt, org ) KpiResultBean
getAssessedResults ( startDate, endDate ) List Find all results for periods ending between the given dates
getAssessedResults ( startDate, endDate, user ) List
getAssessedResults ( user ) List
getAssessedResults ( org ) List
getTarget ( orgData ) BigDecimal
getTargetForLevel ( levelName ) BigDecimal
getTargetForLevel ( orgData, levelName ) BigDecimal
getTargetForLevel ( levelName, start, endDate ) BigDecimal
getTargetForLevel ( orgData, levelName, start, end ) BigDecimal
getPeriodEndDate ( date ) Date
getTargetForLevel ( lvl, start, endDate ) BigDecimal
getTargetForLevel ( profile, levelName, start, endDate ) BigDecimal
progressLevel ( startDate, endDate ) KpiLevelBean Find what level the current user is on track to reach based on a pro-rata evaulation of their data vs target over the current kpi assessment period
progressLevel ( orgData, startDate, endDate ) KpiLevelBean
progressLevel ( org ) KpiLevelBean
progressLevel ( p ) KpiLevelBean
progressLevel ( p, start, end ) KpiLevelBean
getProgress ( p ) BigDecimal
getProgress ( org ) BigDecimal
getProgress ( orgId, startDate, endDate ) BigDecimal
getProgress ( startDate, endDate ) BigDecimal Returns the absolute value of the kpi for the given period
getProgressAndBaseline ( startDate, endDate ) AggrRecord
getProgressAndBaseline ( org, startDate, endDate ) AggrRecord
getProgressAndBaseline ( profile, startDate, endDate ) AggrRecord
getProgress ( p, startDate, endDate ) BigDecimal
getProgress ( org, startDate, endDate ) BigDecimal
getProgressOfLevelPerc ( lvlName ) BigDecimal
getProgressOfLevelPerc ( lvlName, start, endDate ) BigDecimal Get's the pro-rata percentage towards the target. Eg if a user is half way through the year and they have half of their sales then they are at 100% of pro-rata target
getProgressOfLevelPerc ( orgData, lvlName, start, endDate ) BigDecimal
getProgressOfLevelPerc ( profile, lvlName, start, endDate ) BigDecimal
getAssessedResultPerc ( result, levelName ) BigDecimal
getLevelAmount ( result, levelName ) BigDecimal
absoluteProgressOfLevelPerc ( profile, levelName, startDate, endDate, periodEndDate ) BigDecimal Find the absolute (not pro-rata) of progress towards to full period target
absoluteProgressOfLevelPerc ( org, levelName, startDate, endDate, periodEndDate ) BigDecimal Find the absolute (not pro-rata) of progress towards to full period target
getPeriodElapsedPerc ( periodStart, periodEndDate, current ) BigDecimal
getProgressRecords ( pb ) List
getProgressRecords ( orgData ) List
getProgressRecords ( pb, start, endDate ) List
getProgressRecords ( orgData, start, endDate ) List
isAvailable ( p ) boolean
hasGroup ( groupName ) boolean Checks to see if the provided group has access to this KPI
is ( type ) boolean True if matches on frequently, aggregation of applies to group name

Ask a question, or offer an answer